package lanQiaoBei.基础算法.高精度;
import java.util.*;
import java.io.*;
/*
* ”高精度乘法“ A*b 12345*11
* */
public class P2 {
    static ArrayList<Integer>A;
    static int b;
    static ArrayList<Integer>C;
    public static void main(String[]args)throws Exception{
           scan();
           mult(A,b);
           while (!C.isEmpty())
               System.out.print(C.remove(C.size()-1));
    }

    private static void mult(ArrayList<Integer> a, int b) {
            int t=0;
            for(int i=0;i<a.size();i++){
                t+=a.get(i)*b;
                C.add(t%10);
                t/=10;
            }
            if(t!=0)C.add(t);
            while (C.size()>1&&C.get(C.size()-1)==0)
                C.remove(C.size()-1);
    }

    public static void scan()throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        A=new ArrayList();
        for(int i=s.length()-1;i>=0;i--)
            A.add(s.charAt(i)-'0');
        s=br.readLine();
        b=Integer.parseInt(s);
        C=new ArrayList();
    }
}
